//详情页相关的API
import request from "@/utils/request";

//获取商品详情的数据
export const reqDetailGoods = (id) => {
  return request({
    url: "/goods",
    params: {
      id,
    },
  });
};

/**
 *
 * @param {Number} type   1代表24小时热榜 2代表周热榜ƒ
 * @returns
 */
//获取热榜区域的数据
export const reqGetHotGoods = ({ id, type, limit = 3 }) => {
  return request({
    url: "/goods/hot",
    params: {
      id,
      type,
      limit,
    },
  });
};
